package com.longfa.ojbackendjudgeservice.controller.inner;

import com.longfa.ojbackendjudgeservice.service.JudgeService;
import com.longfa.ojbackendmodel.model.entity.QuestionSubmit;
import com.longfa.ojbackendserviceclient.service.JudgeFeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * ClassName: InnerJudgeController
 * Package: com.longfa.ojbackendjudgeservice.controller.inner
 * Description:
 *
 * @Author:
 * @Create: 2024/5/3 - 20:41
 * @Version: v1.0
 */
@RestController
@RequestMapping("/inner")
public class InnerJudgeController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;

    @Override
    @PostMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId) {
        return judgeService.doJudge(questionSubmitId);
    }
}
